	<%@page import="com.etc.util.PageData"%>
<%@page import="com.etc.entity.Housing"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8">
  <title>layui</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="layui/css/layui.css"  media="all">

  <link rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" href="css/common.css">
  <link rel="stylesheet" href="css/myLayui.css">
  <link rel="stylesheet" href="css/mycss.css">
  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
	</head>
	<body>
    <!-- 导航 -->
<ul class="layui-nav" style="padding-left: 100px;"> 
    <span class="logo"><img src="img/logo.png" alt=""></span>
    <li class="layui-nav-item"><a href="is.do">首页</a></li>
    <li class="layui-nav-item"><a href="ss.do?op=apartment01">蔡塘悦舍</a></li>
    <li class="layui-nav-item"><a href="ss.do?op=apartment02">悦舍大院</a></li>
    <li class="layui-nav-item"><a href="ss.do?op=apartment03">悦舍阔居</a></li>
    <li class="layui-nav-item"><a href="ts.do?op=query">社区生活</a></li>
    <li class="layui-nav-item"><a href="is.do?op=about">关于悦舍</a></li>
        <li class="layui-nav-item"><a href="is.do?op=aboutus">关于我们</a></li>

        <c:if test="${sessionScope.username==null}">
       <li class="layui-nav-item user youke" >
          <a href="login.jsp">登录</a>
             </li>
          </c:if>
          
          
          <c:if test="${sessionScope.username!=null}">
        <li class="layui-nav-item user youke" >
                  <a href=""><img src="<%=request.getAttribute("personImg") %>" class="layui-nav-img"><%=request.getAttribute("personNickName") %></a>
                  <dl class="layui-nav-child">
                      <dd><a href="us.do?op=queryPerson">个人中心</a></dd>
                      <dd><a href="us.do?op=updpwd1">密码修改</a></dd>
                      <dd><a href="us.do?op=removesession">退出</a></dd>
                  </dl>
         </li>
          </c:if>

</ul>

<!-- 内容 -->
<div class="w">
    	
    <div class="crumbs"><a href="is.do">首页</a><span>&gt;</span><a>房源查询</a></div>
    
    <div class="apa_search clearfix">
    <% 
    if(request.getAttribute("strLike")!=null){
    	String strLike=request.getAttribute("strLike").toString();
    	%>
    	  <ul class="apa_search_l"><input placeholder="请输入公寓名、房型、等开始找房" value="<%=strLike==""?"":strLike %>" id="search_key"><a></a></ul>
    	<%
    }
    
    %>
    
        <ul class="apa_search_r"><a id="btnSearch">找房</a></ul>
    </div>
                       
  <div class="serach_condition mt15"> 
<ul class="serach_condition_row">
<li class="serach_condition_txt">公寓：</li>
<li class="serach_condition_a" id="tj_brand">
<!-- <a class="seon">不限</a> -->
<a href="is.do?op=searchBypage&strLike=蔡塘悦舍">蔡塘悦舍</a>
<a href="is.do?op=searchBypage&strLike=悦舍大院">悦舍大院</a>
<a href="is.do?op=searchBypage&strLike=蔡塘悦舍">蔡塘悦舍</a>
</li>
</ul>
<!-- <ul class="serach_condition_row"> -->
<!-- <li class="serach_condition_txt">价格：</li> -->
<!-- <li class="serach_condition_a" style="width:auto" id="tj_jiage"> -->
<!-- <a class="seon">不限</a> -->
<!-- <a class="">1500元以下</a> -->
<!-- <a class="">1500-2500元</a> -->
<!-- <a>3500元以上</a> -->
<!-- </li> -->
<!-- </ul>             -->
<ul class="serach_condition_row">
<li class="serach_condition_txt">居室：</li>
<li class="serach_condition_a" id="tj_jushi">
<!-- <a class="seon">不限</a> -->
<a href="is.do?op=searchBypage&strLike=1居">1居</a>
<a href="is.do?op=searchBypage&strLike=2居">2居</a>
<a href="is.do?op=searchBypage&strLike=3居">3居</a>
<a href="is.do?op=searchBypage&strLike=单间">单间</a>
<a href="is.do?op=searchBypage&strLike=复式">复式</a>
</li>
</ul>     
<!-- <ul class="serach_condition_row"> -->
<!-- <li class="serach_condition_txt">面积：</li> -->
<!-- <li class="serach_condition_a" id="tj_area"> -->
<!-- <a class="seon">不限</a> -->
<!-- <a class="">20㎡以下</a> -->
<!-- <a>20㎡-40㎡</a> -->
<!-- <a>40㎡以上</a> -->
<!-- </li> -->
<!-- </ul>      -->
</div>  
    
    <div class="serach_alse mt20 clearfix">
      <!-- <ul class="serach_alse_txt">你已选择：</ul>
        <ul class="serach_alse_a"><li id="s_tj_jiage">1500元以下</li></ul>
        <ul class="serach_alse_btn">全部删除</ul> -->
    </div> 
    
    <div class="search_box mt20">
      <ul class="search_sort clearfix">
          <!-- <span>排序方式：</span>
            <a class="search_sorton"><i></i>默认排序</a>
            <a><i></i>价格</a> -->
        </ul>
        <ul class="search_list clearfix">
        
        	<c:if test="${requestScope.pageData.data!=null}">
        		<c:forEach var="hs" items="${requestScope.pageData.data}">
	
						
<div class="search_list_row">
    <ul class="search_list_pop">
      <span>剩${hs.hsRemain}套</span>${hs.houseName} - ${hs.houseType}
    </ul>
    <ul class="search_list_img"><a href=""><img src="${hs.hsPic01}" width="394" height="263" alt="${hs.houseName}" title="${hs.houseName}"></a></ul>
    <ul class="search_list_txt">
    <!--<a class="js_yyopen_enough" aid="2" roomid="31">查看详情 ></a>-->
  <a class="js_yyopen" aid="2" roomid="31" href="is.do?op=detail&housingId=${hs.hsId}">查看详情 &gt;</a>
    <h6>${hs.hsAddress}</h6>
    <p><i>¥</i><span>${hs.hsPrice}</span>月</p>
    </ul>
</div> 
		
              </c:forEach>
           </c:if>
  
  
</ul>            
    </div> 
    
<!--     <div class="page" style="display: block;"><a num="1" id="page_1" >1</a><a num="2" id="page_2" >2</a><a num="3" id="page_3">3</a><a num="4" id="page_4">4</a><a num="17">尾页</a><a num="2">下一页</a></div> -->
    <div id="demo3" style="text-align: center;margin-top:30px;"></div>
</div>


<!-- footer -->
<div class="footerbg mt80">
    <div class="w footer">
        <ul class="footer_top clearfix">
            <div class="f_logo"><img src=""></div>
              <dl class="f_time">
                <dt>400-920-3805</dt>
                  <dd>服务时间：工作日</dd>
                  <dd>服务时间：9:30-18:00</dd>
              </dl>
              <div class="f_ewm">
                <dl>
                    <dt><img src="https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign=fa9140accd95d143ce7bec711299e967/2934349b033b5bb571dc8c5133d3d539b600bc12.jpg"></dt>
                      <dd>下载app</dd>
                  </dl>
                <dl>
                    <dt><img src="https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign=fa9140accd95d143ce7bec711299e967/2934349b033b5bb571dc8c5133d3d539b600bc12.jpg"></dt>
                      <dd>关注微信</dd>
                  </dl>
                <dl>
                    <dt><img src="https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign=fa9140accd95d143ce7bec711299e967/2934349b033b5bb571dc8c5133d3d539b600bc12.jpg"></dt>
                      <dd>关注微博</dd>
                  </dl>                                        
              </div>
              <div class="f_menu">
                <dl>
                    <dt>常见问题</dt>
                      <dd><a href="#">预约预定</a></dd>
                      <dd><a href="#">入住需知</a></dd>
                      <dd><a href="#">租期服务</a></dd>
                      <dd><a href="#">缴费须知</a></dd>
                  </dl>
                <dl>
                    <dt>关于我们</dt>
                      <dd><a href="#">悦舍故事</a></dd>
                      <dd><a href="#">悦舍文化</a></dd>
                      <dd><a href="#">悦舍大事记</a></dd>
                      <dd><a href="#">悦舍品牌</a></dd>
                  </dl>
                <dl>
                    <dt>活动介绍</dt>
                      <dd><a href="#">线上活动</a></dd>
                      <dd><a href="#">线下活动</a></dd>
                  </dl>                                        
              </div>
          </ul>
        <ul class="copyright"> © 2019 YUESHE All Rights reserved. 悦舍生活（厦门）有限公司</ul>
      </div>
  </div>
</div>
<!-- 
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/handlebars.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src="js/json2.js"></script> -->
<script src="layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
layui.use('element', function(){
  var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
  //监听导航点击
  element.on('.layui-nav', function(elem){
    //console.log(elem)
    layer.msg(elem.text());
  });
});
 
</script>
<script>

</script>

<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<script>
$("#newapa li div").on({
  mouseover :function(){
    $(this).addClass("hs_on")
  },
  mouseout :function(){
    $(this).removeClass("hs_on")  
  }
})

$(".home_apa_pop").on({
  mouseover :function(){
    $(this).children('div').children('dl').css('top','0')
  },
  mouseout :function(){
    $(".commma_pop_dl").css('top','255px')
  }
})




</script>
<script>
layui.use('laypage', function(){
  var laypage = layui.laypage;
  
  laypage.render({
	    elem: 'demo3'
	    ,count:  ${requestScope.pageData.totalCount==null?0:requestScope.pageData.totalCount} //数据总数。一般通过服务端得到 
  		,limit :${requestScope.pageData.pageSize==null?10:requestScope.pageData.pageSize} //每页的记录数
  		,curr : ${requestScope.pageData.page==null?1:requestScope.pageData.page} //当前页
	    ,first: '首页'
	    ,last: '尾页'
	    ,prev: '<em>←</em>'
	    ,next: '<em>→</em>'
	    	  ,jump: function(obj,first){  //切换分页的回调
	    	      console.log(obj) ;//obj（当前分页的所有选项值）
	    	      
	    	      console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
	    	      console.log(obj.limit); //得到每页显示的条数
	    	      
	    	      if(!first)
	    	    	  {
	    	    	  //跳页的具体请求 js代码
	    	    	  location.href="is.do?op=searchBypage&page="+obj.curr+"&pageSize="+obj.limit+"&strLike="+$("#search_key").val();
	    	    	  //每次都知道page的值是多少?
	    	    	  }
	    	    }
	  });
});

$(function(){
	  
	  $("#btnSearch").click(function(){		  
		  location.href="is.do?op=searchBypage&strLike="+$("#search_key").val();
		  
	  });
	
	  
});



</script>
	</body>
</html>
    